<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	
	protected function _initAutoload()
	{
		$moduleLoader = new Zend_Application_Module_Autoloader(array(
		'namespace' => '',
		'basePath' => APPLICATION_PATH));
		return $moduleLoader;
	}
	
    /*
	protected function _initAppAutoload()
	{
		$autoloader = new Zend_Application_Module_Autoloader(array(
			'namespace' => 'App',
			'basePath' => dirname(__FILE__),
		));
		return $autoloader;
	}
    */
	
	
	protected function _initViewHelpers()
	{
		$this->bootstrap('layout');
		$layout = $this->getResource('layout');
		$view = $layout->getView();
		if(FW_MODE == 'client') {
			$view->addScriptPath(PROJECT_PATH .'private/views/');
		} else {
			$view->addScriptPath(APPLICATION_PATH .'views/scripts/');
		}
		$view->doctype('XHTML1_STRICT');
		$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
		$view->headTitle()->setSeparator(' - ');
		// $view->headTitle($projectConfig['title']);
	}
	
	
	protected function _initLayoutHelper()
	{
		$this->bootstrap('frontController');
    	$layout = Zend_Controller_Action_HelperBroker::addHelper(new Fw_Controller_Action_Helper_LayoutLoader());
	}
}